<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>控制器测试</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
            background: #f0f0f0;
        }
        
        .test-container {
            position: relative;
            width: 100vw;
            height: 100vh;
            background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
        }
        
        .controls-container {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 20px;
            border-radius: 10px;
            z-index: 3000;
            min-width: 250px;
        }
        
        .keyboard-hints h3 {
            margin-bottom: 15px;
            font-size: 16px;
            color: #4CAF50;
        }
        
        .hint-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .hint-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .key {
            background: #333;
            color: #4CAF50;
            padding: 5px 10px;
            border-radius: 5px;
            font-family: monospace;
            font-weight: bold;
            min-width: 40px;
            text-align: center;
        }
        
        .description {
            font-size: 14px;
        }
        
        .status-panel {
            border-top: 1px solid #333;
            padding-top: 15px;
            margin-bottom: 15px;
        }
        
        .status-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 14px;
        }
        
        .label {
            color: #ccc;
        }
        
        .value {
            color: #4CAF50;
            font-weight: bold;
        }
        
        .quick-actions {
            border-top: 1px solid #333;
            padding-top: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .action-btn {
            background: #4CAF50;
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 12px;
            transition: background 0.3s;
        }
        
        .action-btn:hover {
            background: #45a049;
        }
        
        .test-info {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(255, 255, 255, 0.9);
            padding: 20px;
            border-radius: 10px;
            max-width: 300px;
        }
    </style>
</head>
<body>
    <div class="test-container">
        <!-- 测试信息 -->
        <div class="test-info">
            <h3>控制器测试</h3>
            <p>如果您能看到右上角的黑色控制器面板，说明控制器组件正常工作。</p>
            <p>控制器应该包含：</p>
            <ul>
                <li>键盘控制说明</li>
                <li>状态信息</li>
                <li>操作按钮</li>
            </ul>
        </div>
        
        <!-- 模拟控制器 -->
        <div class="controls-container">
            <div class="keyboard-hints">
                <h3>控制说明</h3>
                <div class="hint-grid">
                    <div class="hint-item">
                        <span class="key">W/↑</span>
                        <span class="description">前进</span>
                    </div>
                    <div class="hint-item">
                        <span class="key">S/↓</span>
                        <span class="description">后退</span>
                    </div>
                    <div class="hint-item">
                        <span class="key">A/←</span>
                        <span class="description">左转</span>
                    </div>
                    <div class="hint-item">
                        <span class="key">D/→</span>
                        <span class="description">右转</span>
                    </div>
                    <div class="hint-item">
                        <span class="key">鼠标</span>
                        <span class="description">视角控制</span>
                    </div>
                    <div class="hint-item">
                        <span class="key">滚轮</span>
                        <span class="description">缩放</span>
                    </div>
                </div>
            </div>

            <div class="status-panel">
                <div class="status-item">
                    <span class="label">位置:</span>
                    <span class="value">(0.0, 0.0)</span>
                </div>
                <div class="status-item">
                    <span class="label">朝向:</span>
                    <span class="value">0.0°</span>
                </div>
                <div class="status-item">
                    <span class="label">速度:</span>
                    <span class="value">0.0 m/s</span>
                </div>
            </div>

            <div class="quick-actions">
                <button class="action-btn">重置位置</button>
                <button class="action-btn">全屏</button>
                <button class="action-btn">线框模式</button>
            </div>
        </div>
    </div>
</body>
</html>
